package com.pan.admin.module.channel.dao;

import com.pan.admin.module.channel.entity.LoanChannel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 渠道
 * Dao接口
 *
 * @author ts
 * @date 2023-09-11
 */
@Mapper
public interface LoanChannelDao {

    /**
     * 渠道
     */
    List<Map<String, Object>> listLoanChannel(@Param("keyword") String keyword);

    String findLoanChannelNameByLoanChannelId(@Param("loanChannelId") Long loanChannelId);

    /**
     * 根据ID获取列表渠道
     *
     * @param id 渠道
     *           主键
     * @return 渠道
     */
    LoanChannel getById(Long id);

    /**
     * 查询渠道列表
     *
     * @param loanChannel 渠道
     * @return  集合
     */
    List<LoanChannel> list(LoanChannel loanChannel);

    /**
     * 新增渠道
     *
     * @param loanChannel 渠道
     * @return 结果
     */
    int insertLoanChannel(LoanChannel loanChannel);

    /**
     * 修改渠道
     *
     * @param loanChannel 渠道
     * @return 结果
     */
    int updateLoanChannel(LoanChannel loanChannel);

}
